package com.ruoyi.extdata.domain;

import com.ruoyi.extdata.service.impl.XdsServiceImpl;
import lombok.Getter;
import lombok.Setter;

import javax.xml.bind.annotation.*;
import java.util.Map;
import java.util.Optional;

@Setter
@Getter
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "ConnectConsumerMatch")
public class ConsumerMatch {

    @XmlAttribute(name = "xmlns")
    protected String xmlns = "https://als.firstcentralcreditbureau.com/FirstCentralNigeriaWebService";

    @XmlElement(name = "DataTicket")
    private String dataTicket;

    @XmlElement(name = "EnquiryReason")
    String enquiryReason;

    @XmlElement(name = "ConsumerName")
    String consumerName;

    @XmlElement(name = "DateOfBirth")
    String dateOfBirth;

    @XmlElement(name = "Identification")
    String identification;

    @XmlElement(name = "AccountNumber")
    String accountNumber;

    @XmlElement(name = "ProductID")
    String productID;

    String userId;

    public void setAccountNumber(String accountNumber) {
        this.accountNumber =  Optional.ofNullable(accountNumber).orElse("");
    }
}
